﻿using System;
using System.Windows.Forms;
using Client.TopLevel;

namespace PersApp
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // запускаем диалог для авторизации
            LoginForm loginForm = new LoginForm();
            loginForm.ShowDialog();

            IManagerEmployee employee = loginForm.Employee;
            if(employee != null)
            {
                Application.Run(new AppForm(employee));

                employee.LogOut();
            }
        } // main

    } // Program
}
